/*
 * Parser.h
 *
 *  Created on: 29/09/2011
 *      Author: diego
 */

using namespace std;
#include <stdlib.h>
#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
#include "Stopwords.h"

#ifndef PARSER_H_
#define PARSER_H_

class Parser {
private:
	ifstream *document;
	Stopwords* stopword;
	char charLeido;
	string word;
public:
	Parser(Stopwords* stopwords);
	void setDocument(string path);
	string nextWord();
	bool isSeparator(char c);
	bool isInvalidChar(char c);
	bool eof();
	char toLowercase(char c);
	string checkNumber();
	void close();
	virtual ~Parser();
};

#endif /* PARSER_H_ */
